
{include file="include/header.tpl" title="Model: `$modelClass`"}

<h1>
	{$modelClass|escape|ucfirst}:
	{if $model->name}
		{$model->name|escape}
	{else}
		#{$model->id}
	{/if}
</h1>

{include file="smutty/modelNavigation.tpl" edit="yes"}
{include file="smutty/modelRelated.tpl" model=""}

<p>
{foreach item="field" from=$fields}
	{assign var="name" value=$field->name}
	{assign var="value" value=$model->$name}
	<div class="field">
		<div class="name">{$name}:</div>
		<div class="value">
		{if is_object($value)}
			{link url={ action="modelShow" smutty_modelClass=$name smutty_modelId=$value->id } text=$value->name }
		{else}
			{$value|escape}
		{/if}
		</div>
	</div>
{/foreach}
</p>

<div class="clear"></div>

{include file="include/footer.tpl"}
